import os
import sys
from limber import abilities

DIRNUMBER = 0

ROOTPATH = os.path.dirname((os.path.realpath(__file__)))
USERDIR_PATH = os.path.join(ROOTPATH, 'mock-userdir')
SYSTEMDIR_PATH = os.path.join(ROOTPATH, 'mock-systemdir')


INFOS_TEST_0 = {
    'name' : 'mock-plain-text-document',
    'full_name' : 'MockPlainTextDocument',
    'version' : '0.1.0dev',
    'short_description' : 'A mock document used to testboth the ComponentParser and the ComponentFinder.',
    'directory' : os.path.join(USERDIR_PATH, 'Widgets'),
    'filename' : 'mock_plain_text_document.py',
    'abilities' : ['TEXT','PLAIN_TEXT'],
    'interface' : 'document',
    'author' : 'Giacomo Alzetta',
    'author_email' : 'giacomo.alzetta@gmail.com',
    'license' : 'MIT',
    'revision_version' : '347r'
    }

INFOS = [
    INFOS_TEST_0, 
    ]

sys.path.insert(0, os.path.join(USERDIR_PATH, 'Widgets'))
from mock_plain_text_document import MockPlainTextDocument
sys.path.pop(0)

sys.path.insert(0, os.path.join(SYSTEMDIR_PATH, 'Widgets'))
from mock_plain_text_document2 import MockPlainTextDocument2
from mock_html_text_document import MockHtmlTextDocument
from mock_text_view import MockTextView
sys.path.pop(0)

COMPONENTS_TEST_0 = (
    MockPlainTextDocument,
    )

COMPONENTS_TEST_1 = (
    MockTextView,
    )

COMPONENTS = [
    COMPONENTS_TEST_0,
    COMPONENTS_TEST_1,
    ]



MPTD_abilities = (
    abilities.TEXT,
    abilities.PLAIN_TEXT)
MHTD_abilities = (
    abilities.TEXT,
    abilities.HTML_TEXT)
MTV_abilities = (
    abilities.TEXT,
    abilities.VIEW)


COMPONENTS_AND_ABILITIES_TEST_0 = (
    (MockHtmlTextDocument, MHTD_abilities),
    (MockPlainTextDocument2, MPTD_abilities),
    (MockTextView, MTV_abilities)
    )

COMPONENTS_AND_ABILITIES = [
    COMPONENTS_AND_ABILITIES_TEST_0,
    ]
